﻿<%@ Application Language="C#" %>
<%@ Import Namespace="AllInOnePluginBL.Helpers" %>
<%@ Import Namespace="NLog" %>

<script runat="server">

    private static readonly Logger _log = LogManager.GetLogger("PluginHandler");
    private static readonly PluginHandler _pluginHandler = new PluginHandler();
    
    void Application_Start(object sender, EventArgs e) 
    {
        _pluginHandler.StartScheduler();
       _log.Info("Application_Start");
    }
    
    void Application_End(object sender, EventArgs e) 
    {
        _log.Info("Application_End");
        _pluginHandler.StopScheduler();
    }
        
    void Application_Error(object sender, EventArgs e) 
    {
        var error = Server.GetLastError();
        _log.ErrorException("Application_Error", error);
    }

    void Session_Start(object sender, EventArgs e) 
    {
        
        _log.Info("Session_Start");
    }

    void Session_End(object sender, EventArgs e)
    {
        _log.Info("Session_End");
    }
</script>
